package file;

import java.io.File;

/**
 * @author wang hao
 * @date 2023-03-30 20:49
 */
public class Demo02 {
    public static void main(String[] args) {
        File src = new File("src");
        
        // 拿 一级文件 名称
        String[] list = src.list();
        for (String s : list) {
            System.out.println(s);
        }

        File[] files = src.listFiles();
        for (File file : files) {
            System.out.println(file.getAbsolutePath());
        }
    }
}
